Example: images in TestImages . jl

TestImages . jl collects images commonly used for testing computer vision algorithms. With little code, we can create a registry that displays nicely:


			
			
			
			using
			
			
			 
			



			FeatureRegistries
	
			
			,
			
			
			 
			
			ImageShow
			
			,
			
			
			 
			
			TestImages
			
			

			
			
			
			using
			
			
			 
			



			FeatureRegistries
	
			
			:
			
			
			 
			



			Registry
	
			
			,
			
			
			 
			



			Field
	
			
			

			
			

			
			
			images
			
			 
			
			=
			
			 
			
			



			Registry
	
			
			(
			
			
			(
			
			
			;
			
			
        
			
			
			id
			
			 
			
			=
			
			 
			
			



			Field
	
			
			(
			
			String
			
			,
			
			 
			
			
			name
			
			 
			
			=
			
			 
			
			"
			
			ID
			
			"
			
			,
			
			 
			
			
			description
			
			 
			
			=
			
			 
			
			"
			
			The name of the color
			
			"
			
			)
			
			,
			
			
        
			
			
			image
			
			 
			
			=
			
			 
			
			



			Field
	
			
			(
			
			Any
			
			,
			
			 
			
			
			name
			
			 
			
			=
			
			 
			
			"
			
			Image
			
			"
			
			)
			
			,
			
			
    
			
			)
			
			,
			
			
    
			
			
			name
			
			 
			
			=
			
			 
			
			"
			
			Test images
			
			"
			
			,
			
			
    
			
			
			loadfn
			
			 
			
			=
			
			 
			
			
			row
			
			 
			
			->
			
			 
			
			
			row
			
			.
			
			
			image
			
			)
			
			

			
			

			
			
			for
			
			
			 
			
			id
			
			 
			
			in
			
			 
			
			
			
			TestImages
			
			.
			
			
			remotefiles
			
			[
			
			
			1
			
			:
			
			13
			
			]
			
			
			
    
			
			
			image
			
			 
			
			=
			
			 
			
			
			
			TestImages
			
			.
			
			
			testimage
			
			(
			
			id
			
			)
			
			
    
			
			
			
			isnothing
			
			(
			
			image
			
			)
			
			 
			
			||
			
			
			
			 
			
			
			prod
			
			(
			
			
			size
			
			(
			
			image
			
			)
			
			)
			
			 
			
			>
			
			 
			
			500000
			
			 
			
			&&
			
			 
			
			continue
			
			
    
			
			
			push!
			
			(
			
			images
			
			,
			
			 
			
			
			(
			
			
			;
			
			 
			
			id
			
			,
			
			 
			
			image
			
			)
			
			)
			
			

			
			end
			
			

			
			images

			 Downloading artifact: images
Test images
ID Image
:id :image
"airplaneF16.tiff"
"autumn_leaves.png"
"barbara_color.png"
"barbara_gray_512.bmp"
"blobs.gif"
"cameraman.tif"
"chelsea.png"
"coffee.png"
"fabio_color_256.png"
"fabio_color_512.png"
"fabio_gray_256.png"
"fabio_gray_512.png"

When outside an environment that supports HTML output, like a terminal, the registry will be displayed as below:


			
			
			
			using
			
			
			 
			
			ImageInTerminal
			
			

			
			
			show
			
			(
			
			images
			
			)

			Test images

  ID                      Image                                    
  :id                     :image                                   

  "airplaneF16.tiff"      512×512 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

  "autumn_leaves.png"     105×140 Array{RGBA{N0f16},2} with eltyp…
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀    
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    

  "barbara_color.png"     576×720 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀"barbara_gray_512.bmp"  512×512 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀       
                          ▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀       
                          ▀▀▀▀       
                          ▀▀       
                                 
                          ▀▀▀▀       
                          ▀▀▀▀       
                          ▀▀▀▀▀▀▀▀       
                          ▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

  "blobs.gif"             254×256 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀       
                                 
                          ▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                                 
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

  "cameraman.tif"         512×512 Array{Gray{N0f8},2} with eltype…
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

  "chelsea.png"           300×451 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀"coffee.png"            400×600 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 

  "fabio_color_256.png"   256×256 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

  "fabio_color_512.png"   512×512 Array{RGB{N0f8},2} with eltype …
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀       
                          ▀▀       
                          ▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

  "fabio_gray_256.png"    256×256 Array{Gray{N0f8},2} with eltype…
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀       
                          ▀▀       
                                 
                                 
                          ▀▀       
                          ▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀       
                          ▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

  "fabio_gray_512.png"    512×512 Array{Gray{N0f8},2} with eltype…
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀       
                          ▀▀       
                                 
                                 
                          ▀▀       
                          ▀▀       
                          ▀▀▀▀       
                          ▀▀▀       
                          ▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀       
                          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀       

Backlinks